.class public Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;
.super Lcom/snowplowanalytics/snowplow/tracker/events/AbstractEvent;


# instance fields
.field private final affiliation:Ljava/lang/String;

.field private final city:Ljava/lang/String;

.field private final country:Ljava/lang/String;

.field private final currency:Ljava/lang/String;

.field private final items:Ljava/util/List;

.field private final orderId:Ljava/lang/String;

.field private final shipping:Ljava/lang/Double;

.field private final state:Ljava/lang/String;

.field private final taxValue:Ljava/lang/Double;

.field private final totalValue:Ljava/lang/Double;


# direct methods
.method protected constructor <init>(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)V
    .locals 2

    invoke-direct {p0, p1}, Lcom/snowplowanalytics/snowplow/tracker/events/AbstractEvent;-><init>(Lcom/snowplowanalytics/snowplow/tracker/events/AbstractEvent$Builder;)V

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->orderId:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$100(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/snowplowanalytics/snowplow/tracker/utils/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->totalValue:Ljava/lang/Double;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$200(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/Double;

    move-result-object v0

    invoke-static {v0}, Lcom/snowplowanalytics/snowplow/tracker/utils/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->items:Ljava/util/List;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$300(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/util/List;

    move-result-object v0

    invoke-static {v0}, Lcom/snowplowanalytics/snowplow/tracker/utils/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->orderId:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$100(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    const-string v1, "orderId cannot be empty"

    invoke-static {v0, v1}, Lcom/snowplowanalytics/snowplow/tracker/utils/Preconditions;->checkArgument(ZLjava/lang/Object;)V

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->orderId:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$100(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->orderId:Ljava/lang/String;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->totalValue:Ljava/lang/Double;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$200(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/Double;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->totalValue:Ljava/lang/Double;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->affiliation:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$400(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->affiliation:Ljava/lang/String;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->taxValue:Ljava/lang/Double;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$500(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/Double;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->taxValue:Ljava/lang/Double;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->shipping:Ljava/lang/Double;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$600(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/Double;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->shipping:Ljava/lang/Double;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->city:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$700(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->city:Ljava/lang/String;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->state:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$800(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->state:Ljava/lang/String;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->country:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$900(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->country:Ljava/lang/String;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->currency:Ljava/lang/String;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$1000(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->currency:Ljava/lang/String;

    # getter for: Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->items:Ljava/util/List;
    invoke-static {p1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;->access$300(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;)Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->items:Ljava/util/List;

    return-void

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static builder()Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder;
    .locals 2

    new-instance v0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder2;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$Builder2;-><init>(Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction$1;)V

    return-object v0
.end method


# virtual methods
.method public getItems()Ljava/util/List;
    .locals 1

    iget-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->items:Ljava/util/List;

    return-object v0
.end method

.method public bridge synthetic getPayload()Lcom/snowplowanalytics/snowplow/tracker/payload/Payload;
    .locals 1

    invoke-virtual {p0}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->getPayload()Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;

    move-result-object v0

    return-object v0
.end method

.method public getPayload()Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;
    .locals 6

    const/4 v1, 0x0

    new-instance v2, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;

    invoke-direct {v2}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;-><init>()V

    const-string v0, "e"

    const-string v3, "tr"

    invoke-virtual {v2, v0, v3}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_id"

    iget-object v3, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->orderId:Ljava/lang/String;

    invoke-virtual {v2, v0, v3}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_tt"

    iget-object v3, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->totalValue:Ljava/lang/Double;

    invoke-virtual {v3}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Double;->toString(D)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v0, v3}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_af"

    iget-object v3, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->affiliation:Ljava/lang/String;

    invoke-virtual {v2, v0, v3}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v3, "tr_tx"

    iget-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->taxValue:Ljava/lang/Double;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->taxValue:Ljava/lang/Double;

    invoke-virtual {v0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Double;->toString(D)Ljava/lang/String;

    move-result-object v0

    :goto_0
    invoke-virtual {v2, v3, v0}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_sh"

    iget-object v3, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->shipping:Ljava/lang/Double;

    if-eqz v3, :cond_0

    iget-object v1, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->shipping:Ljava/lang/Double;

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Double;->toString(D)Ljava/lang/String;

    move-result-object v1

    :cond_0
    invoke-virtual {v2, v0, v1}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_ci"

    iget-object v1, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->city:Ljava/lang/String;

    invoke-virtual {v2, v0, v1}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_st"

    iget-object v1, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->state:Ljava/lang/String;

    invoke-virtual {v2, v0, v1}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_co"

    iget-object v1, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->country:Ljava/lang/String;

    invoke-virtual {v2, v0, v1}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tr_cu"

    iget-object v1, p0, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->currency:Ljava/lang/String;

    invoke-virtual {v2, v0, v1}, Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;->add(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {p0, v2}, Lcom/snowplowanalytics/snowplow/tracker/events/EcommerceTransaction;->putDefaultParams(Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;)Lcom/snowplowanalytics/snowplow/tracker/payload/TrackerPayload;

    move-result-object v0

    return-object v0

    :cond_1
    move-object v0, v1

    goto :goto_0
.end method
